package BehavioralMode.interpreter.calculator;

/**
 * 加法表达式
 * */
public class AddExpression extends AbstractExpression{

    private AbstractExpression right ;
    private AbstractExpression left ;

    public AddExpression(AbstractExpression right, AbstractExpression left) {
        this.right = right;
        this.left = left;
    }


    @Override
    public int interpret(Context context) {
         return right.interpret(context) + left.interpret(context);
    }
}
